<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Channel PreEdit</title>
        <%include("../inc/editCss.html"){};%>

	</head>
	<body class="no-skin">
		<div class="container-fluid">
			<div class="row">
			  <div class="breadcrumbs">
				<ul class="breadcrumb">
					<li><i class="ace-icon fa fa-home home-icon"></i><a href="../index.jspx" target="_top">首页</a></li>
					<li><a href="list.jspx">栏目</a></li>
					<li class="active">修改</li>
				</ul>
				  <!-- /.breadcrumb --> 
			  </div>
			  <!-- /.breadcrumbs -->
			</div>
			<!-- /.row -->
			<div class="row">
				<div class="page-content">
					<div class="page-header">
						<h1>栏目修改</h1>
					</div>
					<div class="row">
						<div class="col-xd-12">
						    <form action="edit.jspx" method="post" class="form-horizontal" role="form" id="form-data">
						    	<div class="form-group">
						    		<label class="col-md-2 control-label no-padding-right"> 所在栏目 </label>
									<div class="col-md-6">
										<input type="text" id="parentChannel" value="${channel.parent.name!'一级栏目'}" readonly>  <button id="channelBtn" type="button" class="btn-sm btn-default">选择</button>
										<input type="hidden" id="parentid" name="parent" value="${channel.parent.id!0}">
										
										(只有<b>栏目型栏目</b>才可包含子栏目)
									</div>
						    	</div>
						    	<div class="form-group">
									<label class="col-md-2 control-label no-padding-right"> 名称  </label>
									<div class="col-md-6">
										<input type="hidden" name="id" value="${channel.id!0}"> 
										<input type="text" id="name" name="name" placeholder="名称" value="${channel.name!''}" class="col-md-8 form-control " />
									</div>
									
									<label class="col-md-2 control-label no-padding-right"> 排序号  </label>
                                    <div class="col-md-2">
                                        <input type="text" id="orderid" name="orderid" placeholder="排序号" value="${channel.orderid!0}" class="col-md-8" />
                                    </div>
									
								</div>
								
								<div class="space-4"></div>
								
								<div class="form-group">
									<label class="col-md-2 control-label no-padding-right"> 显示模板  </label>
									<div class="col-md-2">
										<select id="template_id" name="templateId">
											<option value="1">默认</option>
										</select>
									</div>
									
									<label class="col-md-2 control-label no-padding-right"> 是否开放  </label>
									<div class="col-md-2">
										<label class="radio-inline">
											<input type="radio" name="isopen" id="isopen_0" value="0">否
										</label>
										<label class="radio-inline">
											<input type="radio" name="isopen" id="isopen_1" value="1" checked>是
										</label>
									</div>
									
									<label class="col-md-2 control-label no-padding-right"> 是否在菜单中显示  </label>
									<div class="col-md-2">
										<label class="radio-inline">
											<input type="radio" name="inmenu" id="inmenu_0" value="0">否
										</label>
										<label class="radio-inline">
											<input type="radio" name="inmenu" id="inmenu_1" value="1" checked>是
										</label>
									</div>
								</div>

								<div class="form-group">
									<label class="col-md-2 control-label no-padding-right"> 栏目类型 </label>
									<div class="col-md-10">
										<label class="radio-inline">
											<input type="radio" name="type" id="channelType_0" value="0" checked onclick="root.manage.channel.changeChannelType(0)">说明型栏目
										</label>
										<label class="radio-inline">
											<input type="radio" name="type" id="channelType_1" value="1" onclick="root.manage.channel.changeChannelType(1)">栏目型栏目
										</label>
										<label class="radio-inline">
											<input type="radio" name="type" id="channelType_2" value="2" onclick="root.manage.channel.changeChannelType(2)">包含文章
										</label>
										<label class="radio-inline">
											<input type="radio" name="type" id="channelType_3" value="3" onclick="root.manage.channel.changeChannelType(3)">综合型栏目
										</label>
										<label class="radio-inline">
											<input type="radio" name="type" id="channelType_4" value="4" onclick="root.manage.channel.changeChannelType(4)">外部链接
										</label>
									</div>
								</div>
								
								<div id="div_shortdesc" class="form-group">
									<label class="col-md-2 control-label no-padding-right"> 摘要 </label>
									<div class="col-md-9">
										<textarea id="summary_container" name="summary">${channel.summary!''}</textarea>
									</div>
								</div>
								
								<div id="div_description" class="form-group">
									<label class="col-md-2 control-label no-padding-right"> 栏目内容 </label>
									<div class="col-md-9">
										<textarea id="content_container" name="content">${channel.content!''}</textarea>
									</div>
								</div>
								
								<div id="div_linkurl" class="form-group">
									<label class="col-md-2 control-label no-padding-right"> 外部链接 </label>
									<div class="col-md-9">
										<div>
										<input type="text" id="linkurl" name="linkurl" placeholder="外部链接" value="${channel.linkurl!''}" class="col-md-12">
										</div>
                                        <div id="upload2"></div>
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-2 control-label no-padding-right">添加时间</label>
									<div class="col-md-3">
										<input type="text" name="addtime" value="${entity.addtime!date(),'yyyy-MM-dd HH:mm:ss'}">
									</div>
									
									<label class="col-md-2 control-label no-padding-right">修改时间</label>
									<div class="col-md-3">
										<input type="text" name="edittime" value="${date(),'yyyy-MM-dd HH:mm:ss'}">
									</div>
								</div>
								<div style="display:none">
									<input type="hidden" id="hits" name="hits" value="${channel.hits!1}">
								</div>
								<div class="clearfix form-actions">
									<div class="col-md-offset-2 col-md-4">
										<button type="reset" class="btn">
											<i class="ace-icon fa fa-undo bigger-110"></i>
											重置
										</button>
										&nbsp;&nbsp;
										<button type="submit" class="btn btn-info">
											<i class="ace-icon fa fa-check bigger-110"></i>
											提交
										</button>
									</div>
								</div>
						    </form>
					    </div>
					</div>
					<!-- /.row -->
				</div>
				<!-- /.page-content -->
			</div>
		</div>
		<!--ztree -->
		<div id="channelContent" class="channelContent">
			<ul id="treeChannels" class="ztree" style="margin-top:0;"></ul>
		</div>
		<!--ztree -->								
		<%include("../inc/editJs.html"){};%>
		<script>
			$(document).ready(function(){
				var options={
					isEdit:true
					,channelType:${channel.type!0}
				    ,isopen:${channel.isopen!0}
				    ,inmenu:${channel.inmenu!0}
				    ,templateId:${channel.templateId!1}
				};
				
				root.manage.channel.edit.init(options);
			});
		</script>
	</body>
</html>